{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "88ad963f-3420-4b67-8107-ef929dcc2c78",
   "metadata": {},
   "outputs": [],
   "source": [
    "import math\n",
    "\n",
    "radius = float(input('请输入圆的半径: '))\n",
    "perimeter = 2 * math.pi * radius\n",
    "area = math.pi * radius * radius\n",
    "print('周长: %.2f' % perimeter)\n",
    "print('面积: %.2f' % area)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
